# 导包
import requests
# 封装login api
class login_api:
    @classmethod
    def login(cls,mobile,pwd):
        herderJson = {"Content-Type":"application/json"}
        jsonData = {'mobile':mobile,'password':pwd}
        resp = requests.post(url='http://ihrm2-test.itheima.net/api/sys/login',
                             headers=herderJson,
                             json=jsonData)
        return resp


if __name__ == '__main__':
    resp = login_api.login('13800000002','123456')
    print(resp.json())